/**
 * @version 2007-1-6
 * @author xalinx at gmail dot com
 */
package org.nanhill.commons.pattern.flow;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @version 2007-1-6
 * @author xalinx at gmail dot com
 * 
 */
public abstract class AbstractFlowFactory implements FlowFactory {

	/** Logger available to subclasses */
	protected final Log logger = LogFactory.getLog(getClass());

	protected String[] flowLocations;

	protected ActionFactory actionFactory;

	protected EventFactory eventFactory;

	protected StateFactory stateFactory;

	public void setActionFactory(ActionFactory actionFactory) {
		this.actionFactory = actionFactory;
	}

	public void setEventFactory(EventFactory eventFactory) {
		this.eventFactory = eventFactory;
	}

	public void setFlowLocations(String[] flowLocations) {
		this.flowLocations = flowLocations;
	}

	public void setStateFactory(StateFactory stateFactory) {
		this.stateFactory = stateFactory;
	}

	protected abstract void buildFlow() throws FlowException;

}
